<template>
  <div class="setting">
  	<x-header :left-options="{backText: ''}">设置</x-header>		
  	<div class="settingControl">
  		<router-link to=""><button class="exit" @click="removeLocalStorage">退出</button></router-link>
  	</div>
		
	</div>
</template>

<script>
import init from '../assets/js/init';
import { XHeader, Actionsheet, TransferDom } from 'vux'

export default {
  name: 'setting',
  data () {
    return {
    	
    }
  },
  methods:{
  	removeLocalStorage(){
  		localStorage.removeItem("result");
			localStorage.removeItem("userRealName");
			localStorage.removeItem('checked');
			var userRealName = localStorage.getItem('userRealName');
			console.log(userRealName);
			this.$router.push('/');
  	}
  },
  components:{
  	XHeader,
    Actionsheet,
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
	@import url("../assets/css/common.css");
	.setting{
		height: 100%;
	}
	.vux-header{
		background-color: #f00 !important;
		position: fixed !important;
		top: 0;
		left: 0;
		z-index: 2000;
		width: 100%;
	}
	
	.vux-header .vux-header-left .left-arrow:before{
		border: 2px solid #fff !important;
    border-width: 2px 0 0 2px !important;
	}
	
	.settingControl{
		width: 100%;
		box-sizing: border-box;
		padding: 0 0.5rem;
		padding-top: 3rem;
	}
	.settingControl .exit{
		width: 100%;
		height: 2rem;
		background-color: #f00;
		color: #fff;
		border: 0;
		border-radius: 0.25rem;
		font-size: 0.8rem;
	}
</style>
